package com.tbit.uqbike.push.constant;

import com.tbit.uqbike.push.pojo.Forbidden;
import com.tbit.uqbike.push.pojo.Geo;
import com.tbit.uqbike.push.pojo.MachineBorrow;
import com.tbit.uqbike.push.pojo.Point;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 系统数据
 *
 * @author Leon
 * 2017年3月8日 下午5:11:40
 */
public class SystemData {
    /**
     * 设备编号到设备id哈希
     */
    public static Map<String, Integer> machineNOMachineIdMap = new ConcurrentHashMap<String, Integer>();
    /**
     * 设备编号到车辆编号哈希
     */
    public static Map<String, String> machineNOUserCodeMap = new ConcurrentHashMap<String, String>();

    /**
     * 设备最后状态哈希(老的)，用于电子围栏判断
     */
    public static Map<Integer, Point> machineStatusOldMap = new ConcurrentHashMap<Integer, Point>();

    /**
     * 设备id到代理商id哈希
     */
    public static Map<Integer, Integer> machineIdAccountIdMap = new ConcurrentHashMap<Integer, Integer>();

    /**
     * 代理商id到电子围栏列表哈希
     */
    public static Map<Integer, List<Geo>> accountIdGeoListMap = new ConcurrentHashMap<>();

    /**
     * 上一次设备数据同步时间
     */
    public static String lastSynTime = null;

    /**
     * 上一次电子围栏同步时间
     */
    public static String lastSynGeoTime = null;

    /**
     * 远程控制操作结果
     */
    public static Map<String, String> terControlMap = new ConcurrentHashMap<String, String>();

    /**
     * 出电子围栏的设备
     */
    public static Map<String, String> outMachineNo = new ConcurrentHashMap<>();

    /**
     * 语音次数计算
     */
    public static Map<String, String> geoCutTime = new ConcurrentHashMap<>();

    /**
     * 电子围栏语音播报时间
     */
    public static Map<String, String> geoViceTime = new ConcurrentHashMap<>();

    /**
     * 电子围栏语音发送时间
     */
    public static Map<String, String> geoSendTime = new ConcurrentHashMap<>();

    /**
     * 语音次数计算
     */
    public static Map<String, Integer> geoViceTice = new ConcurrentHashMap<>();

    /**
     * 当前借出车辆
     */
    public static Map<Integer, MachineBorrow> machineBorrowMap = new ConcurrentHashMap<>();
    /**
     * 设备编号跟设备类型哈希
     */
    public static Map<String, Integer> machineNOMachineTypeMap = new ConcurrentHashMap<String, Integer>();

    /**
     * 设备id到禁行区id哈希
     */
    public static Map<Integer, Integer> machineIdFleetIdMap = new ConcurrentHashMap<Integer, Integer>();

    /**
     * 禁行区id到禁行区列表哈希
     */
    public static Map<Integer, List<Forbidden>> FleetIdToForbiddenMap = new ConcurrentHashMap<>();

    /**
     * 区域出界配置
     */
    public static Map<Integer, Integer> machineAlarm = new ConcurrentHashMap<>();
}
